package ex.my_map;

import java.io.FileInputStream;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * @author small瑞
 */
public class MyTry03 {
    public static void main(String[] args) throws IOException, ParseException {
        Map<Integer , Integer> map = new HashMap<>();

        System.out.println("--------------------------------------------------");
        String current = "02:30";
        String correct = "02:00";
        String pattern = "HH:mm";
        SimpleDateFormat format = new SimpleDateFormat(pattern);
        Date datecur = format.parse(current);
        Date datecor = format.parse(correct);
        int i = datecur.compareTo(datecor);
        System.out.println(datecur.before(datecor));
        long l = datecur.getTime() - datecor.getTime();
        System.out.println(l/60/60/60);
        Set<Integer>set = new HashSet<>();
        Random random = new Random();
        for(int s = 0 ; s < 10 ; s++){
            set.add(random.nextInt(10));
        }
        for(int s = 0 ; s < 100 ; s++){
            map.put(random.nextInt(10),0);
        }
        for(int j:set){
            System.out.print(j+"  :  ");
            if(map.containsKey(j)){
                System.out.print(j);
            }
            System.out.println();
        }
        Object[] ar = set.toArray();
        for(Object j:ar){
            if(map.containsKey((int)i)){

            }
        }

    }
}
